According to the specs all Tbd Unit validation can be performed through Custom Groovy Code. The idea is to keep some standard validations that will be effective out of the box. However, there will be situations where not all the standard validations are enough or they may need to be customized for the case at hand. The following picture is showing the three step merge and actual substitution related interaction that takes place among ECN4, XPS, and Apex components of N4: